﻿using System;
using System.Configuration;
using PortalCurriculo.MvcWebUI.Extensions;

namespace PortalCurriculo.MvcWebUI.Helpers
{
    public class ConfigurationHelper
    {
        public enum Config
        {
            ContaEmailNaoResponder,
            SenhaContaEmailNaoResponder,
            DataInicioLeituraBiblica
        }

        public static string Get(string configName)
        {
            return ConfigurationManager.AppSettings.Get(configName);
        }

        public static string Get(string configName, bool descriptografar)
        {
            return Domain.Helpers.Util.Descriptografar(Get(configName));
        }   

        public static string Get(Config configName)
        {
            return Get(configName.GetDescription());
        }

        public static string Get(Config configName, bool descriptografar)
        {
            return Domain.Helpers.Util.Descriptografar(Get(configName));
        }
    }
}